webupdater.ui = {
    createToolbar: "",
    wireUpOptionsDialog: "",
	wireUpOptionsTabview: "",
    optionsDialog: "",
	optionsTabView: "",
	displayMessage: ""
};

webupdater.ui.createToolbar = function(){
    var oMenu = new YAHOO.widget.MenuBar("basicmenu");
    webupdater.bridge.trace("creating menu");
    
    
    oMenu.addItems([{
        text: "Refresh",
		onclick: { fn: function() {
			var youtubeTags = webupdater.data.getYouTubeTags();
			alert(youtubeTags);
		}}
    }, {
        text: "Options",
        onclick: {
            fn: function(){
                webupdater.ui.optionsDialog.show();
				webupdater.bridge.trace("show options");
            }
        }
	}]);

    oMenu.render("topToolBar");
    //YAHOO.util.Dom.removeClass('basicmenu','yui-overlay');
};

webupdater.ui.wireUpOptionsDialog = function(){
    webupdater.bridge.trace("creating options dialog");

	var saveAllOptionsEntered = function() {
		var youtubeuser = webupdater.ui.optionsDialog.getData().youtubeUserName;
		webupdater.bridge.SaveSiteInfo("YouTube",youtubeuser ,"");
		
	};
	
	var handleSave = function() {
		 saveAllOptionsEntered();
		 webupdater.ui.optionsDialog.hide();
	};
		 
	var handleClose = function() { 
		saveAllOptionsEntered();
		webupdater.ui.optionsDialog.hide();
	};
	
    webupdater.ui.optionsDialog = new YAHOO.widget.Dialog("optionsDiv",  
	            { width : "300px", 
	              fixedcenter : true, 
	              visible : false,  
	              constraintoviewport : true,
	 			  modal: true,
	              buttons : [ { text:"Save", handler:handleSave, isDefault:true }, 
	                          { text:"Close", handler:handleClose } ] ,
				  effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25} 
	             } ); 
    webupdater.ui.optionsDialog.render();   
};

webupdater.ui.wireUpOptionsTabview = function() {
	webupdater.bridge.trace("creating options tabs");
	
	webupdater.ui.optionsTabView = new YAHOO.widget.TabView("optionsTabView"); 
	
};